function test_result = hugotest3(fpath, ratio)
[p, name, ~] = fileparts(fpath);
res = load(fpath);
param = struct('ratio', ratio, 'use_mapping', 1);
results{1} = res.stego;
results{2} = res.cover;
clear res
[results, param] = postprocess(results, param);
newpath = [p, '/', name, '_e',num2str(ratio),'.mat'];
stego = results{1};
cover = results{2};
clear results
save(newpath, 'stego', 'cover', 'param');
e = ensemble_test(stego, cover, 0, 0.85, 12, 3, 1)
test_result = struct('ensemble', e);
save(newpath, '-append', 'test_result');
end

function barcmp(stego, cover)
i=1;
n = size(stego,2);
while i<k
    bar(1:n,[stego(i,:);cover(i,:)]');
    axis off;
    i = i+1;
    pause;
end
end
